#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void add(int n)
{
	char s1[15] = { 0 };
	int i = 0;
	int count = 0;
	int j = 0;
	while (n)
	{
		if (count == 3)
		{
			s1[i] = ',';
			count = 0;
			i++;
		}
		s1[i] = n % 10 + '0';
		n /= 10;
		count++;
		i++;
	}
	for (j=i;j>0;j--)
	{
		printf("%c", s1[j-1]);
	}
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	add(n);
	return 0;
}